POV-Ray : Newsgroups : povray.programming : HELP !! Image used in pigment to create an isosurface problem : HELP !! Image used in pigment to create an isosurface problem Server Time
17 May 2024 07:55:15 EDT (-0400)
  HELP !! Image used in pigment to create an isosurface problem  
From: Sylvain
Date: 29 Jun 2006 08:00:00
Message: <web.44a3c005a26efc189e4a59f60@news.povray.org>
Hello there,

Is it a bug or (most probable) did I miss something ?

I have this very nice image of a checker (this is just for the sake of the
example and not the image I am actually using) stored in a file called
test.pgm:
content of test.pgm:
P2
2 2
255
0 100
100 0

I am using this image in a pigment function, or whatever you might want to
call that:
#local fn_pig= function {
  pigment {
    image_map {
      pgm "test.pgm"
      map_type 0
      interpolate 0
      once
    }
  }
}
#local fn_pig_Height=function { (fn_pig(x, y, 0).red ) }

Then, I just call this function many times, using a loop:
#declare Pas = 0.1;
#declare Loc_x = 0;
#while (Loc_x < 1)
  #declare Loc_y = 0;
  #while (Loc_y < 1)
    #debug concat("x=",str(Loc_x,3,3)," y=",str(Loc_y,3,3)," fn_pig_Height =
",str(fn_pig_Height(Loc_x,Loc_y,0),5,5),"n")
    #declare Loc_y = Loc_y + Pas;
  #end
  #debug "n"
  #declare Loc_x = Loc_x + Pas;
#end

and HERE IS MY QUESTION !!! For each x value strictly lower than 1, and for
each y value stricly lower than 1 (x<1 and y<1), I get what I expect (0 or
0.39216, which is 100/255, depending on x and y). But, for x=1 and
y=anything, or for y=1 and x=anything, I get the value 1 !!
When I render this as an isosurface, I get a kind of wall around my
checker...
Could anyone help me out ?

Hope my description is clear. If not, please ask for more information...

S.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.